// 根据文件名获取图片接口
import request from "@/utils/request";

enum API{
  preview_img = '/api/file/preview/',
  upload_file="/api/file/upload"
}
export const reqGetImg = (fileName:string) => {
  return fileName?request.get<any, any>(API.preview_img + fileName,{responseType : "blob"}):''
}

export const uploadFile = (data: any) => {
  return request.post<any, any>(API.upload_file, data)
}